module.exports = function (req, res, next) {
  res.sendResult = function (code, data, message) {
    if (!res.query?.fmt) {
      res.json({
        code,
        data,
        message,
      });
    }
  };
  next();
};
